﻿<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <link rel="stylesheet" type="text/css" href="~/css/aui.css" />
    <style type="text/css">
        .header {
            padding: 2.5rem 0.5rem 2rem 0.5rem;
        }
    </style>
</head>
<body>
    @using (Html.BeginForm("UpdateDoctor2", "Admin", FormMethod.Post))
    {
        <header class="aui-bar aui-bar-nav aui-text-left header" id="header">
            <br />
            <h1> 医生信息维护 </h1>
        </header>
        
            @model IEnumerable<Doctordbo>
            @foreach (var item in Model)
            {<div class="aui-content aui-margin-b-15">
    <script type="text/javascript" src="~/script/aui-dialog.js"></script>
    <script type="text/javascript" src="~/script/aui-toast.js"></script>
    <script type="text/javascript">
    var dialog = new auiDialog({})
    var toast = new auiToast();
     function openDialog(type) {
        switch (type) {
            case "text":
                dialog.alert({
                    title: "温馨提醒",
                    msg: '确定要离岗此医生吗',
                    buttons: ['取消', '确定']
                }, function (ret) {
                    if (ret.buttonIndex == 2) {
                        toast.success({
                            title: "操作成功",
                            duration: 2000
                        });
                        window.location.href = "/Admin/UpdateDoctor3?id=@item.id";
                    }
                    console.log(ret)
                })
                break;
            default:
                break;
        }
    }
    </script>

    <input type="text" name="id" id="id" value="@item.id">
    <ul class="aui-list aui-form-list">
        <li class="aui-list-header">输入要更改的内容</li>

        <li class="aui-list-item">
            <div class="aui-list-item-inner">
                <div class="aui-list-item-label">
                    医生名称
                </div>
                <div class="aui-list-item-input">
                    <input type="text" name="DoctorName" id="DoctorName" value="@item.doctorname">
                </div>
            </div>
        </li>
        <li class="aui-list-item">
            <div class="aui-list-item-inner">
                <div class="aui-list-item-label">
                    科室选择
                </div>
                <div class="aui-list-item-input">
                    <!--account_password.dbo-->
                    <select name="SelectClassNumber">
                        <option>
                            @switch (item.classnumber)
                            {
                                case 0:
                                    @:已离岗
                            break;
                                case 1:
                                    @:外科
                                    break;
                                case 2:
                                    @:内科
                                    break;
                                case 3:
                                    @:儿科
                                    break;
                                case 4:
                                    @:骨科
                                    break;
                                default:
                                    break;
                            }
                        </option>
                        <option>外科</option>
                        <option>内科</option>
                        <option>儿科</option>
                        <option>骨科</option>
                    </select>
                </div>
            </div>
        </li>
        <li class="aui-list-item">
            <div class="aui-list-item-inner">
                <div class="aui-list-item-label">
                    职称选择
                </div>
                <div class="aui-list-item-input">
                    <select name="SelectDoctorType">
                        <option>
                            @switch (item.doctortype)
                            {
                                case 1:
                                    @:主任医师
                                    break;
                                case 2:
                                    @:副主任医师
                                    break;
                                case 3:
                                    @:主治医师
                                    break;
                                default:
                                    break;
                            }
                        </option>
                        <option>主任医师</option>
                        <option>副主任医师</option>
                        <option>主治医师</option>
                    </select>
                </div>
            </div>
        </li>
        <li class="aui-list-item">
            <div class="aui-list-item-inner">
                <div class="aui-list-item-label">
                    技能描述
                </div>
                <div class="aui-list-item-input" name="DoctorSkill">
                    <input name="DoctorSkill" value="@item.doctorskill" />
                </div>
            </div>
        </li>
    </ul>

    <br />
    <div class="aui-list-item-inner">
        <p><button type="submit" class="aui-btn aui-btn-info aui-btn-block aui-btn-outlined">提交医生信息修改</button></p>
    </div>
    <br />
    <div class="aui-list-item-inner" tapmode onclick="openDialog('text')">
        <p><div class="aui-btn aui-btn-info aui-btn-block aui-btn-outlined">离岗此医生</div></p>
    </div>
    <br />
    <div class="aui-list-item-inner">
        <a href="/Admin/Index"><p><div class="aui-btn aui-btn-info aui-btn-block aui-btn-outlined">返回主界面</div></p></a>
    </div>
</div>
            
          
        }
            }
        </body>
</html>
